<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Salary_model extends CI_Model
{
	
	public function __construct()
	{
		parent::__construct();

	}
	function get_all_salary()
	{
		$this->db->select('*');
		$this->db->from('salary_account');
		$this->db->join('users','salary_account.user_id = users.id');
	return $this->db->get()->result();	
	}
	
	function check_duplicate_entry($data)
	{
		return $this->dd->get_where('salary_account',$data)->num_rows();		
		/*if($query > 0){
		return "Duplicate Data";
		}
		else {
		return FALSE;
		}*/
	}
	
	function create_salary($insert)
	{
		$this->db->insert('salary_account',$insert);		
	}
	
}
